package cn.lili.modules.system.client;

import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.constant.ServiceConstant;
import cn.lili.modules.goods.entity.dos.Goods;
import cn.lili.modules.system.entity.dos.GoodsAuthOpenCallback;
import cn.lili.modules.system.entity.dos.LiAuthSpaceGoods;
import cn.lili.modules.system.fallback.GoodsAuthFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 *
 * 商品授权变动通知
 *
 * @author xiangqian
 * @version 1.0
 * @data 2023/11/27 15:53
 */
@FeignClient(path = "${server.servlet.context-path}", name = ServiceConstant.SYSTEM_SERVICE, contextId = "goodsAuth", fallback = GoodsAuthFallback.class)
public interface GoodsAuthClient {

    @PostMapping("/feign/goodsAuth/getGoods")
    ResultMessage<Object> callBackGoods(@RequestBody GoodsAuthOpenCallback callback);

    @PostMapping("/feign/goodsAuth/getListByAuthSpace")
    List<Goods> getListByAuthSpace (@RequestParam String name);
}
